﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace WindowsFormsApplication1.ConstructorQueriesNoRandom
{
    public partial class ConstructorQueryUC : UserControl
    {
        private ConstructorQuery constructorQuery;
         private QueryTypes queryType;
         private Generator generator;


         public ConstructorQueryUC(QueryTypes _queryType, Generator _generator)
        {
            this.generator = _generator;
            this.queryType = _queryType;
            constructorQuery = new ConstructorQuery(this.queryType);
            InitializeComponent();
            InitializePanelQuery();
        }

        private void dllTablePpal_SelectedIndexChanged(object sender, EventArgs e)
        {

        }

        private void InitializePanelQuery()
        {
            List<DataTable> tables = new List<DataTable>();
            foreach (DataTable table in generator.ds.Tables)
            {
                tables.Add(table);
            }


            dllTablePpal.DataSource = tables.AsEnumerable().Select(x => x.TableName).ToList();
        }
    }

}

 